/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package layer;

import event.JobConfirmEvent;
import event.JobSendableEvent;
import net.sf.appia.core.Layer;
import net.sf.appia.core.Session;
import net.sf.appia.core.events.channel.ChannelInit;
import net.sf.appia.protocols.common.RegisterSocketEvent;
import net.sf.appia.protocols.common.SendableNotDeliveredEvent;
import session.JobSession;

/**
 *
 * @author Welington
 */
public class JobLayer extends Layer{
  
  public JobLayer() {
    /* events that the protocol will create */
    evProvide = new Class[1];
    evProvide[0] = JobConfirmEvent.class;

    /*
     * events that the protocol requires to work This is a subset of the
     * accepted events.
     */
    evRequire = new Class[0];

    /* events that the protocol will accept */
    evAccept = new Class[4];
    evAccept[0] = ChannelInit.class;
    evAccept[1] = RegisterSocketEvent.class;
    evAccept[2] = JobSendableEvent.class;
    evAccept[3] = SendableNotDeliveredEvent.class;
    
  }

    @Override
  public Session createSession() {
    return new JobSession(this);
  }
}
